package com.tb.tbv1productservice.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.tb.v1.api.shoop.ISpPermissionService;
import com.tb.v1.common.base.BaseServiceImpl;
import com.tb.v1.common.base.IBaseDao;
import com.tb.v1.entity.SpPermission;
import com.tb.v1.mapper.SpPermissionMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

/**
 * @author: tangBin
 * @Date: 2020/7/14 0014 11:16
 * @Description:
 */
@Service
public class SpPermissionService extends BaseServiceImpl<SpPermission> implements ISpPermissionService {

    @Autowired
    private SpPermissionMapper spPermissionMapper;

    @Override
    public IBaseDao<SpPermission> getBaseDao() {
        return spPermissionMapper;
    }

    @Override
    public List<SpPermission> getMenus(Integer psPid) {
        return spPermissionMapper.getMenus(psPid);
    }

    @Override
    public List<SpPermission> getRightsList(Map map) {
        return spPermissionMapper.getRightsList(map);
    }

    @Override
    public Integer getRightsCount(Map map) {
        return spPermissionMapper.getRightsCount(map);
    }

    @Override
    public List<SpPermission> getRoleLevel(Map map) {
        return spPermissionMapper.getRoleLevel(map);
    }

    @Override
    public List<SpPermission> getPermissionList(Map map) {
        return spPermissionMapper.getPermissionList(map);
    }
}
